'use strict';

module.exports = app => {
  const { STRING, INTEGER } = app.Sequelize;

  const Admin = app.model.define('admin', {
    admin_id: {
      type: INTEGER,
      primaryKey: true,
      autoIncrement: true,
    },
    user_name: STRING(60),
    email: STRING(60),
    password: STRING(32),
    add_time: INTEGER,
    last_login: INTEGER,
    last_ip: STRING(15),
    role_id: INTEGER,
  });

  return Admin;
};
